package com.example.autopia.view.ViewHolders.News

import androidx.recyclerview.widget.RecyclerView
import com.example.autopia.databinding.ViewholderNewsActionBinding
import com.example.autopia.model.Item.News
import com.example.autopia.view.Listeners.ActionNewsListener

class ActionNewsViewHolder  (private val binding: ViewholderNewsActionBinding) :
    RecyclerView.ViewHolder(binding.root) {

    fun bind(news: News,listener: ActionNewsListener){

        binding.btToCreate.setOnClickListener {
            listener.onAddNewsClick()
        }
        binding.btToMy.setOnClickListener {
            listener.onMyNewsClick()
        }
        binding.btToChannels.setOnClickListener {
            listener.onNewsChannelsClick()
        }
    }
}